package com.xiaocikuai.smallchunks.utils.resultd;

import java.io.Serializable;
import java.util.List;

public class PageResult<T> implements Serializable {

    private long total; // 总记录数
    private List<T> records; // 当前页数据集合


    private Integer totalPages; // New field for total pages
    // 构造方法
    public PageResult() {
    }

    public PageResult(long total, List<T> records,Integer totalPages) {
        this.total = total;
        this.records = records;
        this.totalPages=totalPages;
    }
    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }
    // Getters and setters
    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }
}

